#pragma once
#include <vector>
#include "global_config.h"

//remove the type defs... They are confusing

LOCAL_CONSTANT int ITEM_MAX_QUANTITY = G::UINT8_MAX;
LOCAL_CONSTANT int ITEM_MAX_TYPES = G::UINT8_MAX;

//To create a new item, add the item name in item_load
//then create a enum value that matches the array index
enum ItemType
{
	ITEM_NULL = 0,
	ITEM_WOOD_LOG = 1
};

/*	factor this in
struct ItemQuantity
{
	int item_id;
	int item_quantity;
}*/

struct Inventory
{
	std::vector<ITEM_Amount_int> _items;
	ITEM_Amount_int _item_quantity[ITEM_MAX_QUANTITY];

	Inventory()
	{
		_items.reserve(ITEM_MAX_QUANTITY);
		for (int i = 0; i < ITEM_MAX_QUANTITY; i++){_item_quantity[i] = 0;}
	}
};


struct Game;

void item_load();

void inventory_add_item(Inventory * inv, ItemType it, int amount);
bool inventory_remove_any_item(Inventory * inv, ItemType & out_type);